﻿myApp.controller('BestDealController', function ($scope, $http, DUMMY_DATA, $location, $rootScope) {
    $scope.$emit('newPageLoaded', {
        'title': 'Best Deals | ShiJie Property',
        'description': "Best Deals In Properties. We Work Very Closely With Developers. Over 40 Years Experience. Discover The Best New Property Deals Today!",
        'keywords': 'best deals in properties, best deal properties, best deal property'
    });
    //$scope.$emit('newPageLoaded', { 'title': 'Penang Realty BESTBUY 世界地產 BESTBUY', 'description': 'Bestbuy properties you should not miss, come and see!' });
    $scope.isAndroid = $rootScope.isAndroid;

    pageInit();




    //$scope.property = {};
    //$scope.property.StateName = "State";
    //$scope.property.TypeName = "Property Type"
    //$scope.property.Type = "R";
    //$scope.property.StateId = "";
    //$scope.property.Transact = "S";
    //$scope.property.TransactName = "Sale"
    //$scope.property.Location = "Location";
    //$scope.property.Project = "";
    //$scope.property.PriceMin = null;
    //$scope.property.PriceMax = null;
    $scope.sortOption = "Sorted by High to Low";

    var BASE_URL;
    if ($location.host() == "localhost") {
        BASE_URL = $location.protocol() + "://" + "localhost:" + $location.port();
    } else {
        BASE_URL = $location.protocol() + "://" + $location.host();
    }


    $scope.getShareURL = function (p) {
        //  return (BASE_URL + "/property/" + p.propertyid + "/S" + p.Zoning[0]);
        var type = p.SaleType || p.RentType;
        return (BASE_URL + "/property/" + p.propertyid + "/" + type);
    }

    $scope.getShareTitle = function (p) {
        return p.ShortHeading;
    }

    $scope.getShareDescription = function (p) {
        return p.LongHeading;
    }

    $scope.getShareImageURL = function (p) {
        return (p.PropertyURL || "https://c1.staticflickr.com/3/2280/32796837675_cd6b733c19_m.jpg");
    }



    $scope.paginate = function (value) {
        var begin, end, index;
        begin = ($scope.currentPage - 1) * $scope.numPerPage;
        end = begin + $scope.numPerPage;
        index = $scope.searchData.indexOf(value);
        return (begin <= index && index < end);
    };

    $scope.updateFilterOption = function (option, sortedChanged) {
        $scope.SortOptionChanged = sortedChanged;
        //$scope.$apply();
        console.log("HEY!" + option);
        switch (option) {
            case 0:
                $scope.sortOption = "Sorted by High to Low";
                $scope.sortKey = '-SalePrice';
                break;
            case 1:
                $scope.sortOption = "Sorted by Low to High";
                $scope.sortKey = 'SalePrice';
                break;
            case 2:
                $scope.sortOption = "Sorted by Area (A to Z)";
                $scope.sortKey = 'LongHeading';
                break;
            case 3:
                $scope.sortOption = "Sorted by Area (Z to A)";
                $scope.sortKey = '-LongHeading';
                break;
        }
    }


    $scope.go = function (key, value, transact) {
        console.log("TRANSACT: " + transact);
        console.log("CLICK!");
        value['transact'] = transact;
        var jsonObj = JSON.stringify(value);
        sessionStorage.setItem(key, jsonObj);
    }

    $scope.isEmpty = function (obj) {
        for (var i in obj) if (obj.hasOwnProperty(i)) return false;
        return true;
    };


    $scope.is10Selected = true;
    $scope.is25Selected = false;
    $scope.is50Selected = false;
    $scope.is100Selected = false;
    $scope.changePerPage = function (npp) {
        $scope.numPerPage = npp;
        switch (npp) {
            case 10:
                $scope.is10Selected = true;
                $scope.is25Selected = false;
                $scope.is50Selected = false;
                $scope.is100Selected = false;
                break;
            case 25:
                $scope.is10Selected = false;
                $scope.is25Selected = true;
                $scope.is50Selected = false;
                $scope.is100Selected = false;
                break;
            case 50:
                $scope.is10Selected = false;
                $scope.is25Selected = false;
                $scope.is50Selected = true;
                $scope.is100Selected = false;
                break;
            case 100:
                $scope.is10Selected = false;
                $scope.is25Selected = false;
                $scope.is50Selected = false;
                $scope.is100Selected = true;
                break;
        }
        $scope.totalItems = $scope.searchData.length;
        $scope.currentPage = 1;
        $scope.numPerPage = npp;
    }




    function pageInit() {
        if (DUMMY_DATA == true) {
            var dummyData = [{ "propertyid": "ab0589c7-ea85-4a85-b20e-04c3be070bde", "Latitude": 5.384529, "Longitude": 100.392955, "road": "KURAU JALAN", "location": "PRAI", "state": "PENANG MAINLAND", "type": "2/S S/HSE", "staffid": "0e075adf-ee02-449d-9cf1-01344121df75", "agentname": "TEH KAI LOON", "mobile": "0124240123", "email": "keironteh@lskworld.com", "StaffPicURL": "https://farm8.staticflickr.com/7512/27584879561_d753d5db53_o.jpg", "LandSqrtFt": 1400.00, "BuildUp": 1400.00, "ProjectRemark": null, "Developer": null, "PropertyDesc": null, "Room": 0, "Bathroom": 0, "FloorLoad": null, "Ceiling": null, "BestBuy": 1, "Tenure": "Freehold", "Facing": "", "Zoning": "Commercial", "Furnished": "Not Furnished", "FurnishedRemark": null, "Renovated": "Partially Renovated", "RenovatedRemark": null, "Condition": "", "SRAmt": null, "SCAmt": 950000.00, "SIAmt": null, "SLAmt": null, "SalePrice": 950000.00, "UpdatedDate": "2016-03-30T12:43:46.417", "PropertyURL": "https://farm2.staticflickr.com/1524/25522576854_9e22da8bfa.jpg", "LongHeading": "DOUBLE-STOREY SHOPHOUSE, TAMAN CHAI LENG", "ShortHeading": "2/S S/HSE, TAMAN CHAI LENG", "SaleType": "SC" }, { "propertyid": "a72f21bd-a87a-4713-b9d0-04d7e0a23bc0", "Latitude": null, "Longitude": null, "road": "TELOK PERMAI 1 LORONG", "location": "TELOK AIR TAWAR", "state": "PENANG MAINLAND", "type": "3/S S/HSE", "staffid": "ab78e02c-6622-4a6b-9531-40e7e4ce6f46", "agentname": "MIKI LIM CHUN SIEW", "mobile": "0134817777", "email": "enquiries@lskworld.com", "StaffPicURL": "https://farm8.staticflickr.com/7360/27380694890_43b5393d75_o.jpg", "LandSqrtFt": 1400.00, "BuildUp": 1400.00, "ProjectRemark": null, "Developer": null, "PropertyDesc": null, "Room": 0, "Bathroom": 0, "FloorLoad": null, "Ceiling": null, "BestBuy": 1, "Tenure": "Freehold", "Facing": "", "Zoning": "Commercial", "Furnished": "Not Furnished", "FurnishedRemark": null, "Renovated": "Not Renovated", "RenovatedRemark": null, "Condition": "", "SRAmt": null, "SCAmt": 1200000.00, "SIAmt": null, "SLAmt": null, "SalePrice": 1200000.00, "UpdatedDate": "2014-06-18T10:10:23.607", "PropertyURL": "https://farm2.staticflickr.com/1556/25932220444_b5c2a9025c.jpg", "LongHeading": "THREE-STOREY SHOPHOUSE, TAMAN TELOK PERMAI", "ShortHeading": "3/S S/HSE, TAMAN TELOK PERMAI", "SaleType": "SC" }, { "propertyid": "ab7ced4b-6688-4864-b013-07dff4836131", "Latitude": 5.400971, "Longitude": 100.368052, "road": "SELAT JALAN     ", "location": "BUTTERWORTH", "state": "PENANG MAINLAND", "type": "4/S S/OFF C", "staffid": "d9899bc7-f9b5-4fca-a3b3-e75021ebac77", "agentname": "MONY NG", "mobile": "0124276737", "email": "monyng@lskworld.com", "StaffPicURL": "https://farm4.staticflickr.com/3872/18729593823_21ac95c41d_o.jpg", "LandSqrtFt": 1440.00, "BuildUp": 6360.00, "ProjectRemark": null, "Developer": null, "PropertyDesc": null, "Room": 1, "Bathroom": 1, "FloorLoad": null, "Ceiling": null, "BestBuy": 1, "Tenure": "Freehold", "Facing": "", "Zoning": "Commercial", "Furnished": "Not Furnished", "FurnishedRemark": null, "Renovated": "Not Renovated", "RenovatedRemark": null, "Condition": "", "SRAmt": null, "SCAmt": 1300000.00, "SIAmt": null, "SLAmt": null, "SalePrice": 1300000.00, "UpdatedDate": "2016-07-27T09:50:27.807", "PropertyURL": "https://farm2.staticflickr.com/1509/25934267743_89b21fe138.jpg", "LongHeading": "4 STOREY SHOP OFFICE CORNER, TAMAN SELAT", "ShortHeading": "4/S S/OFF C, TAMAN SELAT", "SaleType": "SC" }, { "propertyid": "f1a4ec61-ac77-4e9f-97dd-2048b9b5ec93", "Latitude": 5.340202, "Longitude": 100.435464, "road": "IKS BUKIT TENGAH JALAN   ", "location": "BUKIT TENGAH", "state": "PENANG MAINLAND", "type": "1.5/S TER", "staffid": "ab78e02c-6622-4a6b-9531-40e7e4ce6f46", "agentname": "MIKI LIM CHUN SIEW", "mobile": "0134817777", "email": "enquiries@lskworld.com", "StaffPicURL": "https://farm8.staticflickr.com/7360/27380694890_43b5393d75_o.jpg", "LandSqrtFt": 2160.00, "BuildUp": 2160.00, "ProjectRemark": null, "Developer": null, "PropertyDesc": null, "Room": 0, "Bathroom": 0, "FloorLoad": null, "Ceiling": null, "BestBuy": 1, "Tenure": "Freehold", "Facing": "", "Zoning": "Industrial", "Furnished": "Not Furnished", "FurnishedRemark": null, "Renovated": "Not Renovated", "RenovatedRemark": null, "Condition": "", "SRAmt": null, "SCAmt": null, "SIAmt": 800000.00, "SLAmt": null, "SalePrice": 800000.00, "UpdatedDate": "2016-08-22T15:12:48.59", "PropertyURL": "https://farm2.staticflickr.com/1488/25187907425_16b1e7e67f.jpg", "LongHeading": "ONE & A HALF STOREY TERRACE, KAWASAN PERINDUSTRIAN BUKIT TENGAH", "ShortHeading": "1.5/S TER, KAWASAN PERINDUSTRIAN BUKIT TENGAH", "SaleType": "SI" }, { "propertyid": "6f6ab8a4-f6f2-4021-a9ce-2ae3a7af6714", "Latitude": 5.366013, "Longitude": 100.458469, "road": "TAN SAI GIN JALAN ", "location": "BUKIT MERTAJAM", "state": "PENANG MAINLAND", "type": "VAC LAND", "staffid": "9a0716b4-f0f9-4721-833b-655cd21b5545", "agentname": "TEH SIU SHAN", "mobile": "0198007007", "email": "ssteh@lskworld.com", "StaffPicURL": "https://farm4.staticflickr.com/3716/19624993906_1540f1b6c1_o.jpg", "LandSqrtFt": 21000.00, "BuildUp": 0.00, "ProjectRemark": null, "Developer": null, "PropertyDesc": null, "Room": 0, "Bathroom": 0, "FloorLoad": null, "Ceiling": null, "BestBuy": 1, "Tenure": "Freehold", "Facing": "North", "Zoning": "Commercial", "Furnished": "Not Furnished", "FurnishedRemark": null, "Renovated": "Not Renovated", "RenovatedRemark": null, "Condition": "", "SRAmt": null, "SCAmt": null, "SIAmt": null, "SLAmt": 3200000.00, "SalePrice": 3200000.00, "UpdatedDate": "2016-06-21T15:29:38.037", "PropertyURL": "https://farm8.staticflickr.com/7315/27709922152_c1d665936c.jpg", "LongHeading": "VACANT LAND, TAMAN TAN SAI GIN", "ShortHeading": "VAC LAND, TAMAN TAN SAI GIN", "SaleType": "SL" }, { "propertyid": "b61d1680-56fb-41ad-a7b0-3f04c4e6659d", "Latitude": 5.281335, "Longitude": 100.455522, "road": "TAMBUN EMAS 2 LORONG   ", "location": "SIMPANG AMPAT", "state": "PENANG MAINLAND", "type": "2/S TER C", "staffid": "ab78e02c-6622-4a6b-9531-40e7e4ce6f46", "agentname": "MIKI LIM CHUN SIEW", "mobile": "0134817777", "email": "enquiries@lskworld.com", "StaffPicURL": "https://farm8.staticflickr.com/7360/27380694890_43b5393d75_o.jpg", "LandSqrtFt": 2100.00, "BuildUp": 1000.00, "ProjectRemark": null, "Developer": null, "PropertyDesc": null, "Room": 4, "Bathroom": 3, "FloorLoad": null, "Ceiling": null, "BestBuy": 1, "Tenure": "Freehold", "Facing": "", "Zoning": "Residential", "Furnished": "Furnished", "FurnishedRemark": null, "Renovated": "Renovated", "RenovatedRemark": null, "Condition": "", "SRAmt": 650000.00, "SCAmt": null, "SIAmt": null, "SLAmt": null, "SalePrice": 650000.00, "UpdatedDate": "2015-07-24T14:02:38.463", "PropertyURL": "https://farm1.staticflickr.com/504/19329527648_7f85909d05.jpg", "LongHeading": "DOUBLE STOREY TERRACE CORNER, TAMAN TAMBUN EMAS", "ShortHeading": "2/S TER C, TAMAN TAMBUN EMAS", "SaleType": "SR" }, { "propertyid": "728e7323-5e22-412b-b9cb-5499f0fb2df2", "Latitude": 5.397395, "Longitude": 100.291528, "road": "THEAN TEIK LEBUHRAYA", "location": "AIR ITAM", "state": "PENANG ISLAND", "type": "CONDO", "staffid": "eefde287-d76b-418b-9577-9f30361f4ac2", "agentname": "MAYZEL WONG", "mobile": "0175758999", "email": "mayzel@lskworld.com", "StaffPicURL": "https://farm4.staticflickr.com/3944/18729572383_674f7d7ab3_o.jpg", "LandSqrtFt": 1091.00, "BuildUp": 1091.00, "ProjectRemark": null, "Developer": null, "PropertyDesc": "Brand new unit. Kek Lok Si view. Valuation is at RM680k, high loan amount can be arrange.", "Room": 3, "Bathroom": 2, "FloorLoad": null, "Ceiling": null, "BestBuy": 1, "Tenure": "Freehold", "Facing": "", "Zoning": "Residential", "Furnished": "Not Furnished", "FurnishedRemark": null, "Renovated": "Not Renovated", "RenovatedRemark": null, "Condition": "", "SRAmt": 600000.00, "SCAmt": null, "SIAmt": null, "SLAmt": null, "SalePrice": 600000.00, "UpdatedDate": "2016-06-01T16:39:02.377", "PropertyURL": "https://farm6.staticflickr.com/5788/21074898615_52e02c521d.jpg", "LongHeading": "CONDOMINIUM, ALL SEASONS PARK", "ShortHeading": "CONDO, ALL SEASONS PARK", "SaleType": "SR" }, { "propertyid": "38f16df9-cfa0-4857-a365-5b77240bc021", "Latitude": 5.395937, "Longitude": 100.289951, "road": "THEAN TEIK LEBUHRAYA", "location": "AIR ITAM", "state": "PENANG ISLAND", "type": "CONDO", "staffid": "783322d9-f9a4-43d7-89bf-b63812f49173", "agentname": "STEPHEN FOO", "mobile": "0124852981", "email": "stephenfoo@lskworld.com", "StaffPicURL": "https://farm4.staticflickr.com/3774/18727760624_3ff97e89e0_o.jpg", "LandSqrtFt": 1323.00, "BuildUp": 1323.00, "ProjectRemark": null, "Developer": null, "PropertyDesc": "Corner unit..2 side by side car park", "Room": 4, "Bathroom": 3, "FloorLoad": null, "Ceiling": null, "BestBuy": 1, "Tenure": "Freehold", "Facing": "", "Zoning": "Residential", "Furnished": "Not Furnished", "FurnishedRemark": null, "Renovated": "Not Renovated", "RenovatedRemark": null, "Condition": "", "SRAmt": 750000.00, "SCAmt": null, "SIAmt": null, "SLAmt": null, "SalePrice": 750000.00, "UpdatedDate": "2016-06-01T16:34:36.693", "PropertyURL": "https://farm2.staticflickr.com/1535/23947514412_592a6a45bf.jpg", "LongHeading": "CONDOMINIUM, ALL SEASONS PARK", "ShortHeading": "CONDO, ALL SEASONS PARK", "SaleType": "SR" }, { "propertyid": "c0724d04-504f-4037-a0da-5f11a9255de2", "Latitude": 5.201920, "Longitude": 100.527245, "road": "WIDURI 6 LORONG", "location": "SUNGAI JAWI", "state": "PENANG MAINLAND", "type": "2/S TER C", "staffid": "ab78e02c-6622-4a6b-9531-40e7e4ce6f46", "agentname": "MIKI LIM CHUN SIEW", "mobile": "0134817777", "email": "enquiries@lskworld.com", "StaffPicURL": "https://farm8.staticflickr.com/7360/27380694890_43b5393d75_o.jpg", "LandSqrtFt": 1690.00, "BuildUp": 1690.00, "ProjectRemark": null, "Developer": null, "PropertyDesc": null, "Room": 4, "Bathroom": 3, "FloorLoad": null, "Ceiling": null, "BestBuy": 1, "Tenure": "Freehold", "Facing": "", "Zoning": "Residential", "Furnished": "Not Furnished", "FurnishedRemark": null, "Renovated": "Not Renovated", "RenovatedRemark": null, "Condition": "", "SRAmt": 195000.00, "SCAmt": null, "SIAmt": null, "SLAmt": null, "SalePrice": 195000.00, "UpdatedDate": "2016-11-07T10:44:27.857", "PropertyURL": "https://farm2.staticflickr.com/1582/24403447672_c6df20d0b5.jpg", "LongHeading": "DOUBLE STOREY TERRACE CORNER, TAMAN WIDURI", "ShortHeading": "2/S TER C, TAMAN WIDURI", "SaleType": "SR" }, { "propertyid": "93766c7d-64d9-48fd-8861-632d6b088c95", "Latitude": 5.433903, "Longitude": 100.314542, "road": "CONCORDIA JALAN", "location": "GURNEY", "state": "PENANG ISLAND", "type": "CONDO", "staffid": "783322d9-f9a4-43d7-89bf-b63812f49173", "agentname": "STEPHEN FOO", "mobile": "0124852981", "email": "stephenfoo@lskworld.com", "StaffPicURL": "https://farm4.staticflickr.com/3774/18727760624_3ff97e89e0_o.jpg", "LandSqrtFt": 4600.00, "BuildUp": 4600.00, "ProjectRemark": null, "Developer": null, "PropertyDesc": null, "Room": 5, "Bathroom": 5, "FloorLoad": null, "Ceiling": null, "BestBuy": 1, "Tenure": "Freehold", "Facing": "", "Zoning": "Residential", "Furnished": "Furnished", "FurnishedRemark": null, "Renovated": "Renovated", "RenovatedRemark": null, "Condition": "", "SRAmt": 2850000.00, "SCAmt": null, "SIAmt": null, "SLAmt": null, "SalePrice": 2850000.00, "UpdatedDate": "2016-06-22T10:02:05.157", "PropertyURL": "https://farm8.staticflickr.com/7414/27726710912_80ae974c76.jpg", "LongHeading": "CONDOMINIUM, GURNEY PALACE", "ShortHeading": "CONDO, GURNEY PALACE", "SaleType": "SR" }, { "propertyid": "e88924c5-3574-4600-8e9f-6cff549f8621", "Latitude": 5.415080, "Longitude": 100.337768, "road": "ARMENIAN LEBUH", "location": "GEORGETOWN", "state": "PENANG ISLAND", "type": "3/S S/HSE", "staffid": "783322d9-f9a4-43d7-89bf-b63812f49173", "agentname": "STEPHEN FOO", "mobile": "0124852981", "email": "stephenfoo@lskworld.com", "StaffPicURL": "https://farm4.staticflickr.com/3774/18727760624_3ff97e89e0_o.jpg", "LandSqrtFt": 2040.00, "BuildUp": 6120.00, "ProjectRemark": null, "Developer": null, "PropertyDesc": null, "Room": 0, "Bathroom": 0, "FloorLoad": null, "Ceiling": null, "BestBuy": 1, "Tenure": "Freehold", "Facing": "", "Zoning": "Commercial", "Furnished": "Furnished", "FurnishedRemark": null, "Renovated": "Renovated", "RenovatedRemark": null, "Condition": "", "SRAmt": null, "SCAmt": 6000000.00, "SIAmt": null, "SLAmt": null, "SalePrice": 6000000.00, "UpdatedDate": "2016-04-09T14:19:08.177", "PropertyURL": "https://farm2.staticflickr.com/1698/24232285825_c14390b7ae.jpg", "LongHeading": "THREE-STOREY SHOPHOUSE, GEORGETOWN", "ShortHeading": "3/S S/HSE, GEORGETOWN", "SaleType": "SC" }, { "propertyid": "07db9212-d10b-4545-8b5b-74685ffa3c2d", "Latitude": 5.200065, "Longitude": 100.495029, "road": "JAWI JAYA 1 JALAN", "location": "JAWI", "state": "PENANG MAINLAND", "type": "3/S S/OFF", "staffid": "9a0716b4-f0f9-4721-833b-655cd21b5545", "agentname": "TEH SIU SHAN", "mobile": "0198007007", "email": "ssteh@lskworld.com", "StaffPicURL": "https://farm4.staticflickr.com/3716/19624993906_1540f1b6c1_o.jpg", "LandSqrtFt": 1400.00, "BuildUp": 3800.00, "ProjectRemark": null, "Developer": null, "PropertyDesc": null, "Room": 3, "Bathroom": 2, "FloorLoad": null, "Ceiling": null, "BestBuy": 1, "Tenure": "Freehold", "Facing": "West", "Zoning": "Commercial", "Furnished": "Not Furnished", "FurnishedRemark": null, "Renovated": "Partially Renovated", "RenovatedRemark": null, "Condition": "", "SRAmt": null, "SCAmt": 1200000.00, "SIAmt": null, "SLAmt": null, "SalePrice": 1200000.00, "UpdatedDate": "2016-07-01T13:15:38.823", "PropertyURL": "https://farm8.staticflickr.com/7550/27135337070_4902194c9d.jpg", "LongHeading": "3 STOREY SHOP OFFICE, TAMAN JAWI JAYA", "ShortHeading": "3/S S/OFF, TAMAN JAWI JAYA", "SaleType": "SC" }, { "propertyid": "b247c838-a3ee-4033-998c-7c4dfd0ad012", "Latitude": 5.386251, "Longitude": 100.305163, "road": "MASJID NEGERI JALAN", "location": "GREEN LANE", "state": "PENANG ISLAND", "type": "2/S S/D C", "staffid": "9a0716b4-f0f9-4721-833b-655cd21b5545", "agentname": "TEH SIU SHAN", "mobile": "0198007007", "email": "ssteh@lskworld.com", "StaffPicURL": "https://farm4.staticflickr.com/3716/19624993906_1540f1b6c1_o.jpg", "LandSqrtFt": 3950.00, "BuildUp": 3950.00, "ProjectRemark": null, "Developer": null, "PropertyDesc": null, "Room": 4, "Bathroom": 3, "FloorLoad": null, "Ceiling": null, "BestBuy": 1, "Tenure": "Freehold", "Facing": "South West", "Zoning": "Residential", "Furnished": "Not Furnished", "FurnishedRemark": null, "Renovated": "Partially Renovated", "RenovatedRemark": null, "Condition": "", "SRAmt": 3980000.00, "SCAmt": null, "SIAmt": null, "SLAmt": null, "SalePrice": 3980000.00, "UpdatedDate": "2016-08-05T18:51:29.46", "PropertyURL": "https://farm9.staticflickr.com/8752/28162577134_a591b30aac.jpg", "LongHeading": "DOUBLE STOREY SEMI-DETACHED CORNER", "ShortHeading": "2/S S/D C", "SaleType": "SR" }, { "propertyid": "f57f9b85-36a5-44a7-80d0-8182f332e9db", "Latitude": 5.477755, "Longitude": 100.259851, "road": "MOONLIGHT BAY JALAN", "location": "BATU FERRINGHI", "state": "PENANG ISLAND", "type": "4/S DET", "staffid": "783322d9-f9a4-43d7-89bf-b63812f49173", "agentname": "STEPHEN FOO", "mobile": "0124852981", "email": "stephenfoo@lskworld.com", "StaffPicURL": "https://farm4.staticflickr.com/3774/18727760624_3ff97e89e0_o.jpg", "LandSqrtFt": 4400.00, "BuildUp": 4800.00, "ProjectRemark": null, "Developer": null, "PropertyDesc": "with swimming pool and lift", "Room": 6, "Bathroom": 5, "FloorLoad": null, "Ceiling": null, "BestBuy": 1, "Tenure": "Freehold", "Facing": "", "Zoning": "Residential", "Furnished": "Not Furnished", "FurnishedRemark": null, "Renovated": "Not Renovated", "RenovatedRemark": null, "Condition": "", "SRAmt": 2980000.00, "SCAmt": null, "SIAmt": null, "SLAmt": null, "SalePrice": 2980000.00, "UpdatedDate": "2016-08-04T10:44:50.2", "PropertyURL": "https://farm4.staticflickr.com/3785/20080133205_a2ab0e7584.jpg", "LongHeading": "FOUR STOREY DETACHED, MOONLIGHT BAY", "ShortHeading": "4/S DET, MOONLIGHT BAY", "SaleType": "SR" }, { "propertyid": "5644c7d8-1ff0-4bc6-ac93-8da7aef68c3b", "Latitude": 5.339397, "Longitude": 100.283640, "road": "BUKIT JAMBUL JALAN", "location": "BUKIT JAMBUL", "state": "PENANG ISLAND", "type": "CONDO", "staffid": "eefde287-d76b-418b-9577-9f30361f4ac2", "agentname": "MAYZEL WONG", "mobile": "0175758999", "email": "mayzel@lskworld.com", "StaffPicURL": "https://farm4.staticflickr.com/3944/18729572383_674f7d7ab3_o.jpg", "LandSqrtFt": 2277.00, "BuildUp": 2277.00, "ProjectRemark": "Tower 2", "Developer": null, "PropertyDesc": "York Concealed Split Unit Air Conditioning To Living, Dining & All Bedrooms.", "Room": 4, "Bathroom": 4, "FloorLoad": null, "Ceiling": null, "BestBuy": 1, "Tenure": "Leasehold", "Facing": "North West", "Zoning": "Residential", "Furnished": "Furnished", "FurnishedRemark": null, "Renovated": "Renovated", "RenovatedRemark": null, "Condition": "", "SRAmt": 1276635.00, "SCAmt": null, "SIAmt": null, "SLAmt": null, "SalePrice": 1276635.00, "UpdatedDate": "2015-09-24T20:19:03.91", "PropertyURL": "https://farm6.staticflickr.com/5833/21649062536_b64737b0de.jpg", "LongHeading": "CONDOMINIUM, HILLCREST RESIDENCES", "ShortHeading": "CONDO, HILLCREST RESIDENCES", "SaleType": "SR" }, { "propertyid": "435aa32e-f742-46e5-b03d-8de46514232b", "Latitude": 5.305086, "Longitude": 100.209253, "road": "KANPUNG DATO LIM CHONG KOOI JALAN", "location": "BALIK PULAU", "state": "PENANG ISLAND", "type": "AGR LAND", "staffid": "91296169-8651-4a10-8ea5-34a1697f7d28", "agentname": "LONG SOO KEAT", "mobile": "0183987777", "email": "longsookeat@lskworld.com", "StaffPicURL": "https://farm2.staticflickr.com/1459/26499442055_39490f0b1c_o.jpg", "LandSqrtFt": 264845.00, "BuildUp": 0.00, "ProjectRemark": "GOT MOUNTAIN WATER STREAM,7 CHALET,33 RAMBITAN TREES AND ABOUT 135 DURIAN TREES", "Developer": null, "PropertyDesc": "RAMBUTAN AND DURIAN TRESS，7 CHALETS", "Room": 7, "Bathroom": 9, "FloorLoad": null, "Ceiling": null, "BestBuy": 1, "Tenure": "Freehold", "Facing": "N/A", "Zoning": "Algriculture", "Furnished": "Not Furnished", "FurnishedRemark": null, "Renovated": "Not Renovated", "RenovatedRemark": null, "Condition": "", "SRAmt": null, "SCAmt": null, "SIAmt": null, "SLAmt": 5296900.00, "SalePrice": 5296900.00, "UpdatedDate": "2016-10-10T17:57:04.553", "PropertyURL": "https://farm9.staticflickr.com/8633/29366706906_72b4911ac3.jpg", "LongHeading": "AGRICULTURAL LAND", "ShortHeading": "AGR LAND", "SaleType": "SL" }, { "propertyid": "2f4aa3eb-2686-4b70-991a-9c89c7bde177", "Latitude": 5.407822, "Longitude": 100.381405, "road": "BAGAN 43 JALAN", "location": "BUTTERWORTH", "state": "PENANG MAINLAND", "type": "2/S TER", "staffid": "b9fe0256-e070-473f-86f0-c6bb9bfa0531", "agentname": "OOI JYH SIANG", "mobile": "0172509595", "email": "jsooi@lskworld.com", "StaffPicURL": "https://farm9.staticflickr.com/8572/28152375032_d1abf44b2c_o.jpg", "LandSqrtFt": 1600.00, "BuildUp": 800.00, "ProjectRemark": null, "Developer": null, "PropertyDesc": null, "Room": 4, "Bathroom": 3, "FloorLoad": null, "Ceiling": null, "BestBuy": 1, "Tenure": "Freehold", "Facing": "", "Zoning": "Residential", "Furnished": "Not Furnished", "FurnishedRemark": null, "Renovated": "Not Renovated", "RenovatedRemark": null, "Condition": "", "SRAmt": 700000.00, "SCAmt": null, "SIAmt": null, "SLAmt": null, "SalePrice": 700000.00, "UpdatedDate": "2016-09-21T13:25:34.367", "PropertyURL": "https://farm9.staticflickr.com/8489/29791413116_33bdf0a16c.jpg", "LongHeading": "DOUBLE STOREY TERRACE, TAMAN BAGAN", "ShortHeading": "2/S TER, TAMAN BAGAN", "SaleType": "SR" }, { "propertyid": "e015f68d-ef67-4a52-90dd-9e671493d914", "Latitude": 5.366299, "Longitude": 100.425138, "road": "PERMATANG PAUH JALAN", "location": "BUKIT MERTAJAM", "state": "PENANG MAINLAND", "type": "DEV LAND", "staffid": "91296169-8651-4a10-8ea5-34a1697f7d28", "agentname": "LONG SOO KEAT", "mobile": "0183987777", "email": "longsookeat@lskworld.com", "StaffPicURL": "https://farm2.staticflickr.com/1459/26499442055_39490f0b1c_o.jpg", "LandSqrtFt": 52541.00, "BuildUp": 0.00, "ProjectRemark": null, "Developer": null, "PropertyDesc": "NEAR TO MCDONALD BANDAR PERDA", "Room": 0, "Bathroom": 0, "FloorLoad": null, "Ceiling": null, "BestBuy": 1, "Tenure": "Freehold", "Facing": "N/A", "Zoning": "Commercial", "Furnished": "Not Furnished", "FurnishedRemark": null, "Renovated": "Not Renovated", "RenovatedRemark": null, "Condition": "", "SRAmt": null, "SCAmt": null, "SIAmt": null, "SLAmt": 5779510.00, "SalePrice": 5779510.00, "UpdatedDate": "2016-08-03T09:42:15.007", "PropertyURL": "https://farm9.staticflickr.com/8686/16325381844_55afde7b07.jpg", "LongHeading": "DEVELOPMENT LAND", "ShortHeading": "DEV LAND", "SaleType": "SL" }, { "propertyid": "bfecc353-63b4-4317-b108-a4f268c22cf2", "Latitude": 5.478016, "Longitude": 100.264955, "road": "BATU FERRINGHI 1 TINGKAT", "location": "TANJUNG BUNGAH", "state": "PENANG ISLAND", "type": "4/S DET", "staffid": "783322d9-f9a4-43d7-89bf-b63812f49173", "agentname": "STEPHEN FOO", "mobile": "0124852981", "email": "stephenfoo@lskworld.com", "StaffPicURL": "https://farm4.staticflickr.com/3774/18727760624_3ff97e89e0_o.jpg", "LandSqrtFt": 6450.00, "BuildUp": 4500.00, "ProjectRemark": null, "Developer": null, "PropertyDesc": "PANAROMIC SEAVIEW, INDIVIDUAL LIFT", "Room": 4, "Bathroom": 5, "FloorLoad": null, "Ceiling": null, "BestBuy": 1, "Tenure": "Freehold", "Facing": "", "Zoning": "Residential", "Furnished": "Not Furnished", "FurnishedRemark": null, "Renovated": "Partially Renovated", "RenovatedRemark": null, "Condition": "", "SRAmt": 4300000.00, "SCAmt": null, "SIAmt": null, "SLAmt": null, "SalePrice": 4300000.00, "UpdatedDate": "2016-07-12T11:25:04.857", "PropertyURL": "https://farm8.staticflickr.com/7619/27977561026_6500d72357.jpg", "LongHeading": "FOUR STOREY DETACHED, HILLTOP VILLAS", "ShortHeading": "4/S DET, HILLTOP VILLAS", "SaleType": "SR" }, { "propertyid": "8c7e6701-1348-473e-a80d-ae483ce953e9", "Latitude": 5.215450, "Longitude": 100.509470, "road": "SERULING JALAN", "location": "SUNGAI BAKAP", "state": "PENANG MAINLAND", "type": "2/S L/IND", "staffid": "ab78e02c-6622-4a6b-9531-40e7e4ce6f46", "agentname": "MIKI LIM CHUN SIEW", "mobile": "0134817777", "email": "enquiries@lskworld.com", "StaffPicURL": "https://farm8.staticflickr.com/7360/27380694890_43b5393d75_o.jpg", "LandSqrtFt": 43560.00, "BuildUp": 11410.00, "ProjectRemark": null, "Developer": null, "PropertyDesc": null, "Room": 0, "Bathroom": 0, "FloorLoad": null, "Ceiling": null, "BestBuy": 1, "Tenure": "Freehold", "Facing": "", "Zoning": "Industrial", "Furnished": "Not Furnished", "FurnishedRemark": null, "Renovated": "Not Renovated", "RenovatedRemark": null, "Condition": "", "SRAmt": null, "SCAmt": null, "SIAmt": 5500000.00, "SLAmt": null, "SalePrice": 5500000.00, "UpdatedDate": "2016-09-01T12:09:48.267", "PropertyURL": "https://farm9.staticflickr.com/8300/28751914914_4dc65dfff2.jpg", "LongHeading": "TWO STOREY LIGHT INDUSTRIAL, NEW PROJECT", "ShortHeading": "2/S L/IND, NEW PROJECT", "SaleType": "SI" }, { "propertyid": "e93b9105-0dc9-4d36-aad3-b2f848a3ef40", "Latitude": 5.200065, "Longitude": 100.495029, "road": "JAWI JAYA 1 JALAN", "location": "JAWI", "state": "PENANG MAINLAND", "type": "3/S S/OFF", "staffid": "9a0716b4-f0f9-4721-833b-655cd21b5545", "agentname": "TEH SIU SHAN", "mobile": "0198007007", "email": "ssteh@lskworld.com", "StaffPicURL": "https://farm4.staticflickr.com/3716/19624993906_1540f1b6c1_o.jpg", "LandSqrtFt": 1400.00, "BuildUp": 3800.00, "ProjectRemark": null, "Developer": null, "PropertyDesc": null, "Room": 3, "Bathroom": 2, "FloorLoad": null, "Ceiling": null, "BestBuy": 1, "Tenure": "Freehold", "Facing": "West", "Zoning": "Commercial", "Furnished": "Not Furnished", "FurnishedRemark": null, "Renovated": "Partially Renovated", "RenovatedRemark": null, "Condition": "", "SRAmt": null, "SCAmt": 1200000.00, "SIAmt": null, "SLAmt": null, "SalePrice": 1200000.00, "UpdatedDate": "2016-07-01T13:15:32.473", "PropertyURL": "https://farm8.staticflickr.com/7494/27312789442_c55eb9489f.jpg", "LongHeading": "3 STOREY SHOP OFFICE, TAMAN JAWI JAYA", "ShortHeading": "3/S S/OFF, TAMAN JAWI JAYA", "SaleType": "SC" }, { "propertyid": "4c85a6e4-82af-4d5c-845d-b7039ca55de1", "Latitude": 5.264840, "Longitude": 100.422144, "road": "BATU KAWAN JALAN", "location": "BATU KAWAN", "state": "PENANG MAINLAND", "type": "VAC LAND", "staffid": "91296169-8651-4a10-8ea5-34a1697f7d28", "agentname": "LONG SOO KEAT", "mobile": "0183987777", "email": "longsookeat@lskworld.com", "StaffPicURL": "https://farm2.staticflickr.com/1459/26499442055_39490f0b1c_o.jpg", "LandSqrtFt": 19558.00, "BuildUp": 0.00, "ProjectRemark": ",with vacant possession", "Developer": null, "PropertyDesc": "next old ah yen seafood", "Room": 0, "Bathroom": 0, "FloorLoad": null, "Ceiling": null, "BestBuy": 1, "Tenure": "Freehold", "Facing": "", "Zoning": "Residential", "Furnished": "Not Furnished", "FurnishedRemark": null, "Renovated": "Not Renovated", "RenovatedRemark": null, "Condition": "", "SRAmt": null, "SCAmt": null, "SIAmt": null, "SLAmt": 977900.00, "SalePrice": 977900.00, "UpdatedDate": "2016-04-05T18:10:49.227", "PropertyURL": "https://farm2.staticflickr.com/1467/26537282235_8aedc29c3d.jpg", "LongHeading": "VACANT LAND", "ShortHeading": "VAC LAND", "SaleType": "SL" }, { "propertyid": "1ce0e105-eb94-4cac-9df9-b863a373b49d", "Latitude": 5.289682, "Longitude": 100.232767, "road": "KAMPUNG PAYA SOLOK", "location": "TELUK KUMBAR", "state": "PENANG ISLAND", "type": "3/S S/D C", "staffid": "eefde287-d76b-418b-9577-9f30361f4ac2", "agentname": "MAYZEL WONG", "mobile": "0175758999", "email": "mayzel@lskworld.com", "StaffPicURL": "https://farm4.staticflickr.com/3944/18729572383_674f7d7ab3_o.jpg", "LandSqrtFt": 3485.00, "BuildUp": 3100.00, "ProjectRemark": null, "Developer": null, "PropertyDesc": null, "Room": 6, "Bathroom": 4, "FloorLoad": null, "Ceiling": null, "BestBuy": 1, "Tenure": "Freehold", "Facing": "N/A", "Zoning": "Residential", "Furnished": "Not Furnished", "FurnishedRemark": null, "Renovated": "Not Renovated", "RenovatedRemark": null, "Condition": "", "SRAmt": 2150000.00, "SCAmt": null, "SIAmt": null, "SLAmt": null, "SalePrice": 2150000.00, "UpdatedDate": "2016-07-06T14:23:57.257", "PropertyURL": "https://farm2.staticflickr.com/1690/24863668929_e240978b8e.jpg", "LongHeading": "THREE STOREY SEMI-DETACHED CORNER, NEXT TO CASCARA 88", "ShortHeading": "3/S S/D C, NEXT TO CASCARA 88", "SaleType": "SR" }, { "propertyid": "c3366e4a-acc7-40f7-a66d-cf9944cfa944", "Latitude": 5.425684, "Longitude": 100.381464, "road": "RAJA UDA JALAN", "location": "RAJA UDA", "state": "PENANG MAINLAND", "type": "CONDO", "staffid": "01e38f67-39f1-435a-94a8-21847ea4afe0", "agentname": "ALVIN TEH", "mobile": "0182575717", "email": "tjt@lskworld.com", "StaffPicURL": "https://farm1.staticflickr.com/516/19162517368_b20643e0b1_o.jpg", "LandSqrtFt": 1130.00, "BuildUp": 1130.00, "ProjectRemark": null, "Developer": null, "PropertyDesc": "2 car park", "Room": 3, "Bathroom": 2, "FloorLoad": null, "Ceiling": null, "BestBuy": 1, "Tenure": "Freehold", "Facing": "", "Zoning": "Residential", "Furnished": "Furnished", "FurnishedRemark": null, "Renovated": "Partially Renovated", "RenovatedRemark": null, "Condition": "", "SRAmt": 398000.00, "SCAmt": null, "SIAmt": null, "SLAmt": null, "SalePrice": 398000.00, "UpdatedDate": "2016-08-24T11:07:59.33", "PropertyURL": "https://farm6.staticflickr.com/5773/20836398305_83b52dd65c.jpg", "LongHeading": "CONDOMINIUM, CASSIA CONDOMINIUM", "ShortHeading": "CONDO, CASSIA CONDOMINIUM", "SaleType": "SR" }, { "propertyid": "080a4b6e-57ef-4f91-8a47-d4699001f20f", "Latitude": 5.292762, "Longitude": 100.259789, "road": "KOLAM IKAN 1 LORONG", "location": "BAYAN LEPAS", "state": "PENANG ISLAND", "type": "2/S S/D", "staffid": "ab78e02c-6622-4a6b-9531-40e7e4ce6f46", "agentname": "MIKI LIM CHUN SIEW", "mobile": "0134817777", "email": "enquiries@lskworld.com", "StaffPicURL": "https://farm8.staticflickr.com/7360/27380694890_43b5393d75_o.jpg", "LandSqrtFt": 3000.00, "BuildUp": 2600.00, "ProjectRemark": null, "Developer": null, "PropertyDesc": null, "Room": 5, "Bathroom": 4, "FloorLoad": null, "Ceiling": null, "BestBuy": 1, "Tenure": "Freehold", "Facing": "", "Zoning": "Residential", "Furnished": "Not Furnished", "FurnishedRemark": null, "Renovated": "Not Renovated", "RenovatedRemark": null, "Condition": "", "SRAmt": 1450000.00, "SCAmt": null, "SIAmt": null, "SLAmt": null, "SalePrice": 1450000.00, "UpdatedDate": "2016-01-07T16:30:53.537", "PropertyURL": "https://farm2.staticflickr.com/1473/24226152295_7628f9fed9.jpg", "LongHeading": "DOUBLE STOREY SEMI-DETACHED, TAMAN SRI MURNI", "ShortHeading": "2/S S/D, TAMAN SRI MURNI", "SaleType": "SR" }, { "propertyid": "6002947c-8344-49fc-ab84-da8a82cb35ce", "Latitude": 5.325707, "Longitude": 100.282629, "road": "MAHSURI JALAN", "location": "BAYAN BARU", "state": "PENANG ISLAND", "type": "2.5/S S/OFF", "staffid": "eefde287-d76b-418b-9577-9f30361f4ac2", "agentname": "MAYZEL WONG", "mobile": "0175758999", "email": "mayzel@lskworld.com", "StaffPicURL": "https://farm4.staticflickr.com/3944/18729572383_674f7d7ab3_o.jpg", "LandSqrtFt": 1188.00, "BuildUp": 2060.00, "ProjectRemark": null, "Developer": null, "PropertyDesc": null, "Room": 1, "Bathroom": 0, "FloorLoad": null, "Ceiling": null, "BestBuy": 1, "Tenure": "Freehold", "Facing": "", "Zoning": "Commercial", "Furnished": "Not Furnished", "FurnishedRemark": null, "Renovated": "Partially Renovated", "RenovatedRemark": null, "Condition": "", "SRAmt": null, "SCAmt": 850000.00, "SIAmt": null, "SLAmt": null, "SalePrice": 850000.00, "UpdatedDate": "2016-05-26T14:15:10.88", "PropertyURL": "https://farm9.staticflickr.com/8700/16758087427_78d69ee808.jpg", "LongHeading": "TWO AND HALF STOREY SHOP OFFICE, D'PIAZZA MALL", "ShortHeading": "2.5/S S/OFF, D'PIAZZA MALL", "SaleType": "SC" }, { "propertyid": "ad3c8d8c-e8a3-4076-a7f8-dacc5df55f2e", "Latitude": 5.328715, "Longitude": 100.298451, "road": "KAMPUNG JAWA LEBUH", "location": "BAYAN BARU", "state": "PENANG ISLAND", "type": "1.5/S DET", "staffid": "4ad68dad-1092-4545-bfce-6e00348f33a5", "agentname": "ROY LIM", "mobile": "0124311122", "email": "roylim@lskworld.com", "StaffPicURL": "https://farm8.staticflickr.com/7393/27975253740_ca1f46992c_o.jpg", "LandSqrtFt": 217800.00, "BuildUp": 196000.00, "ProjectRemark": null, "Developer": null, "PropertyDesc": null, "Room": 0, "Bathroom": 0, "FloorLoad": null, "Ceiling": null, "BestBuy": 1, "Tenure": "Leasehold", "Facing": "", "Zoning": "Industrial", "Furnished": "Not Furnished", "FurnishedRemark": null, "Renovated": "Not Renovated", "RenovatedRemark": null, "Condition": "", "SRAmt": null, "SCAmt": null, "SIAmt": 26000000.00, "SLAmt": null, "SalePrice": 26000000.00, "UpdatedDate": "2016-01-16T20:12:57.33", "PropertyURL": "https://farm2.staticflickr.com/1665/24279415382_b23ec40b3c.jpg", "LongHeading": "ONE & A HALF STOREY DETACHED, FREE TRADE ZONE PHASE 3", "ShortHeading": "1.5/S DET, FREE TRADE ZONE PHASE 3", "SaleType": "SI" }, { "propertyid": "889cf172-71ae-4aae-a012-e4fb286752b9", "Latitude": 5.360333, "Longitude": 100.385474, "road": "PERUSAHAAN 4 TINGKAT", "location": "PRAI", "state": "PENANG MAINLAND", "type": "2/S DET", "staffid": "ff84c8dd-e80f-4956-b7ba-9d6d6c663bad", "agentname": "JT TAN", "mobile": "0123926682", "email": "jttan@lskworld.com", "StaffPicURL": "https://farm2.staticflickr.com/1550/25894540864_bd454b6be3_o.jpg", "LandSqrtFt": 251401.00, "BuildUp": 164783.00, "ProjectRemark": null, "Developer": null, "PropertyDesc": null, "Room": 1, "Bathroom": 1, "FloorLoad": null, "Ceiling": null, "BestBuy": 1, "Tenure": "Leasehold", "Facing": "N/A", "Zoning": "Industrial", "Furnished": "Furnished", "FurnishedRemark": null, "Renovated": "Renovated", "RenovatedRemark": null, "Condition": "", "SRAmt": null, "SCAmt": null, "SIAmt": 25000000.00, "SLAmt": null, "SalePrice": 25000000.00, "UpdatedDate": "2016-02-23T10:58:30.22", "PropertyURL": "https://farm9.staticflickr.com/8744/16331446873_86f847f5df.jpg", "LongHeading": "DOUBLE STOREY DETACHED, KAWASAN PERINDUSTRIAN PRAI", "ShortHeading": "2/S DET, KAWASAN PERINDUSTRIAN PRAI", "SaleType": "SI" }, { "propertyid": "2dd23c99-674b-4d7d-bd52-ff8ce46e472e", "Latitude": 5.412698, "Longitude": 100.562967, "road": "PERUSAHAAN JALAN", "location": "KULIM", "state": "KEDAH", "type": "1.5/S DET", "staffid": "65a9016e-676b-4ee3-b79f-89288740c7a2", "agentname": "FRANKIE LEE", "mobile": "0174417313", "email": "frankielee@lskworld.com", "StaffPicURL": "https://farm4.staticflickr.com/3772/19344073372_a710d0f4d5_o.jpg", "LandSqrtFt": 227118.00, "BuildUp": 120000.00, "ProjectRemark": null, "Developer": null, "PropertyDesc": null, "Room": 1, "Bathroom": 1, "FloorLoad": null, "Ceiling": "40", "BestBuy": 1, "Tenure": "Leasehold", "Facing": "N/A", "Zoning": "Industrial", "Furnished": "Not Furnished", "FurnishedRemark": null, "Renovated": "Not Renovated", "RenovatedRemark": null, "Condition": "", "SRAmt": null, "SCAmt": null, "SIAmt": 13000000.00, "SLAmt": null, "SalePrice": 13000000.00, "UpdatedDate": "2016-07-20T13:38:32.38", "PropertyURL": "https://farm9.staticflickr.com/8737/16948882692_110310e774.jpg", "LongHeading": "ONE & A HALF STOREY DETACHED, KAWASAN PERUSAHAAN KULIM", "ShortHeading": "1.5/S DET, KAWASAN PERUSAHAAN KULIM", "SaleType": "SI" }];
            $scope.searchData = dummyData;
            console.log($scope.searchData.length);
            $scope.totalItems = $scope.searchData.length;
            $scope.currentPage = 1;
            $scope.numPerPage = 10;
        }else{
            $http.post('api/PropertySearch/GetBestBuytProperty').success(function (data) {
                console.log("Best Deal/Buy: " + JSON.stringify(data));
                $scope.searchData = data;
                $scope.totalItems = $scope.searchData.length;
                $scope.currentPage = 1;
                $scope.numPerPage = 10;
            }).error(function (err) {
                alert("ERROR RETRIEVE:" + JSON.stringify(err));
            });
             
        }

        
    }

    

   


});